import { Color } from "../util";
import { Base, Tuple } from "./Base";

export class BaseItem extends Base {

    public icon: number

    //物品的等级
    public level = 2
    //名称显示方式 0,1,2
    public item_billboard_type = 0
    //前置条件
    public precondition_list: Tuple
    //生命值
    public hp_max = 100
    //开启碰撞
    public disable_overlapping = false
    //自动使用
    public auto_use = false

    //可以丢弃
    public discard_enable = true
    //死亡时是否掉落
    public discard_when_dead = true
    //掉落后到期消失
    public delete_on_discard = false
    //掉落后多久消失
    public drop_stay_time = 9999
    //堆叠类型0,1,2 不可以 充能 堆叠
    public stack_type = 2
    //最大充能数
    public maximum_charging = 5
    //默认充能数
    public cur_charge = 0

    //最大堆叠层数
    public maximum_stacking = 5
    //当前堆叠层数
    public cur_stack = 1
    //使用消耗次数
    public use_consume = 1
    //附加的主动技能
    public attached_ability: Tuple
    //cd组
    public cd_type: string
    //被动技能
    public attached_passive_abilities: Tuple
    //合成素材
    public compose_list: Tuple
    //购买开始时间
    public start_rft = 1
    //库存恢复间隔 
    public refresh_interval = 1
    //初始库存
    public init_stock = 5
    //最大库存
    public max_stock = 5
    //可以被抵押
    public sale_enable = true
    //购买所需资源
    public buy_res_list: Tuple
    //出售获得资源
    public sell_res_list: Tuple
    //声音事件列表
    public sound_event_list: Tuple

    //附加单位属性 0.0
    public attached_agility = 0.0
    public attached_intelligence = 0.0
    public attached_strength = 0.0
    public attached_critical_chance = 0.0
    public attached_dodge_rate = 0.0
    public attached_hit_rate = 0.0
    public attached_hp_max = 0.0
    public attached_hp_rec = 0.0
    public attached_pene_mag = 0.0
    public attached_pene_phy = 0.0

    public kv = {}
    //模型数据
    public base_color_mod = 1
    public base_tint_color: Color
    public body_size = 1.0
    public effect_list = {}
    public model: number
    public model_opacity = 1
    public use_base_tint_color = false
}